<include file="Public/min-header" />
<link href="__PUBLIC__/plugins/daterangepicker/daterangepicker-bs3.css" rel="stylesheet" type="text/css" />
<script src="__PUBLIC__/plugins/daterangepicker/moment.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/plugins/daterangepicker/daterangepicker.js" type="text/javascript"></script>
<div class="wrapper">
	<include file="Public/breadcrumb"/>
	<section class="content">
       <div class="row">
       		<div class="col-xs-12">
	       		<div class="box">
	             <div class="box-header">
	           	   <nav class="navbar navbar-default">	     
				      <div class="collapse navbar-collapse">
	    				<div class="navbar-form form-inline">
				            <div class="form-group">
				            	<p class="text-success margin blod">投诉管理:</p>
				            </div>
				             <div class="form-group">
                                 <a class="btn btn-default" href="{:U('Comment/complain_list')}">投诉列表</a>&nbsp;&nbsp;&nbsp;&nbsp;                                            
                                 <a class="btn btn-default" href="{:U('Comment/subject_list')}" >投诉主题</a>&nbsp;&nbsp;&nbsp;&nbsp;                                            
                                 <a class="btn btn-default" href="{:U('Comment/subject_info')}" >添加主题</a>&nbsp;&nbsp;&nbsp;&nbsp;
                                 <a class="btn btn-default" href="{:U('Comment/complain_list')}">投诉设置</a>&nbsp;&nbsp;&nbsp;&nbsp;
				            </div>	
				          </div>
				       </div>
	    		 	</nav>	
	               	<nav class="navbar navbar-default">	     
				        <div class="collapse navbar-collapse">
				          <form class="navbar-form form-inline" action="" method="post">
				           <div class="form-group">
				            	<label class="control-label" for="input-order-id">投诉状态</label>
				            	 <select name="complain_state" class="form-control">
									   <option value="1">新投诉</option>
				            	 	   <option value="0">待申诉</option>
                                       <option value="2">对话中</option>
                                       <option value="3">待仲裁</option>
                                       <option value="3">已关闭</option>
                                 </select>   
				            </div>
				            <div class="form-group">
				              	<input type="text" name="accuser_name" class="form-control" placeholder="投诉人">
				            </div>
				            <div class="form-group">
				              	<input type="text" name="complain_subject_content" class="form-control" placeholder="投诉主题">
				            </div>
				            <div class="form-group">
				              	<input type="text" name="accused_name" class="form-control" placeholder="被投诉店铺">
				            </div>
                            <div class="form-group">
                    			<div class="input-group margin">
						            <div class="input-group-addon">
						               	选择时间  <i class="fa fa-calendar"></i>
						            </div>
					               <input type="text" class="form-control pull-right" name="timegap" value="{$timegap}" id="start_time">
					            </div>
                             </div>	
				            <button type="submit" class="btn btn-primary">查询</button>	          
				          </form>
				      	</div>
	    			</nav>
	    			
	    			<nav class="navbar navbar-default">	                          	
	    			   <div class="callout callout-inro">
							<p>1. 在投诉时效内，买家可对订单进行投诉，投诉主题由管理员在后台统一设置。</p>
					        <p>2. 投诉时效可在系统设置处进行设置。</p>
					        <p>3. 点击详细，可进行投诉审核。审核完成后，被投诉店铺可进行申诉。申诉成功后，投诉双方进行对话，最后由后台管理员进行仲裁操作。</p>
				        </div>
					</nav>
	             </div>
	             <div class="box-body">
	           	 <div class="row">
	            	<div class="col-sm-12">
		              <table id="list-table" class="table table-bordered table-striped dataTable">
		                 <thead>
		                   <tr role="row">
                               <th>投诉人</th>
                               <th>被投诉店铺</th>
			                   <th>投诉主题</th>	
			                   <th>投诉时间</th>
			                   <th>状态</th>
		                  	   <th>操作</th>
		                   </tr>
		                 </thead>
						<tbody>
                          <foreach name="list" item="vo" key="k" >
                             <tr role="row">    
                             <td>{$vo.accuser_name}</td>
                             <td>{$vo.accused_name}</td>
		                     <td>{$vo.complain_subject_content}</td>	                    
		                     <td>{$vo.complain_datetime|date='Y-m-d H:i:s',###}</td>                                  
		                     <td>{$vo.complain_state}</td>
		                     <td class="text-center">
		                      	<a class="btn btn-info" href="{:U('Comment/complain_info',array('complain_id'=>$vo['complain_id']))}">查看</a>
		                      	<a class="btn btn-danger" href="{:U('Comment/complain_close',array('complain_id'=>$vo['complain_id']))}">关闭</a>
				     		</td>
		                   </tr>
		                  </foreach>
		                   </tbody>
		                 <tfoot>
		                 
		                 </tfoot>
		               </table>
	               </div>
	          </div>
              <div class="row">
              	    <div class="col-sm-6 text-left">
              	    	<button class="btn btn-default btn-sm checkbox-toggle"><i class="fa fa-square-o"></i></button>
              	    </div>
                    <div class="col-sm-6 text-right">{$page}</div>		
              </div>
	          </div>
	        </div>
       	</div>
       </div>
   </section>
</div>
<script>
$(document).ready(function() {
	$('#start_time').daterangepicker({
		format:"YYYY-MM-DD",
		singleDatePicker: false,
		showDropdowns: true,
		minDate:'2016-01-01',
		maxDate:'2030-01-01',
		startDate:'2016-01-01',
        showWeekNumbers: true,
        timePicker: false,
        timePickerIncrement: 1,
        timePicker12Hour: true,
        ranges: {
           '今天': [moment(), moment()],
           '昨天': [moment().subtract('days', 1), moment().subtract('days', 1)],
           '最近7天': [moment().subtract('days', 6), moment()],
           '最近30天': [moment().subtract('days', 29), moment()],
           '上一个月': [moment().subtract('month', 1).startOf('month'), moment().subtract('month', 1).endOf('month')]
        },
        opens: 'right',
        buttonClasses: ['btn btn-default'],
        applyClass: 'btn-small btn-primary',
        cancelClass: 'btn-small',
	    locale : {
            applyLabel : '确定',
            cancelLabel : '取消',
            fromLabel : '起始时间',
            toLabel : '结束时间',
            customRangeLabel : '自定义',
            daysOfWeek : [ '日', '一', '二', '三', '四', '五', '六' ],
            monthNames : [ '一月', '二月', '三月', '四月', '五月', '六月','七月', '八月', '九月', '十月', '十一月', '十二月' ],
            firstDay : 1
        }
	});
});
</script>
</body>
</html>